import static org.junit.Assert.*;


import org.junit.Test;


public class LinkedListTest {

	
	
	@Test
	public void testInsert() {
		LinkedList ll = new LinkedList();
		
		ll.insert(3);
		ll.insert(-10);
		
		if(ll.start == null)
			ll.start = ll.start.getNext();
		
		assertEquals(3, ll.start.getData());
		ll.start = ll.start.getNext();
		assertEquals(-10, ll.start.getData());
		
	}
	
	@Test
	public void testDelete() {
		LinkedList lst = new LinkedList();
		
		lst.insert(5);
		lst.insert(75);
		lst.insert(-250);
		lst.insert(-8);
		lst.delete(5);
		lst.delete(-250);
		
		if(lst.start == null)
			lst.start = lst.start.getNext();
		
		assertEquals(75, lst.start.getData());
		lst.start = lst.start.getNext();
		assertEquals(-8, lst.start.getData());
		assertEquals(null,lst.start.getNext());
		
	}
}
